package com.xyoto.takeawayBusiness.mapper;

import com.xyoto.takeawayBusiness.entity.Category;
import com.xyoto.takeawayBusiness.entity.Shop;
import com.xyoto.takeawayBusiness.vo.CategoryVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @ClassName:
 * @Author: 挽风
 * @Date: 2022
 * @Copyright: 2022 by 挽风
 * @Description:
 **/
@Mapper
public interface CategoryMapper {

    /**
     * 查询是否存在该经营品类
     * @param categoryId
     * @return
     */
    Integer isExistCategory(Integer categoryId);

    /**
     * 新增经营品类
     * @param category 经营类别
     * @return
     */
    Integer saveCategory(Category category);

    /**
     * 获取经营品类顺序
     * @return
     */
    Short getCategoryOrder();

    /**
     * 获取经营品类列表
     * @param status
     * @return
     */
    List<CategoryVO> getCategoryList(Short status);

    /**
     * 获取经营品类顺序是否相同
     * @param order 顺序
     * @return
     */
    Category getCategoryOrderNums(Short order);

    /**
     * 修改经营品类
     * @param category 经营品类实体
     * @return
     */
    Integer updateCategory(Category category);
}
